<script>
	import api from './api/index.js'
	export default {
		onLaunch: function () {
			console.log('App Launch')
			let openid = uni.getStorageSync('openid') || ''
			if (openid && openid != '') return
			wx.login({
				success: async (res) => {
					let code = res.code
					console.log('login', code)
					api.noAuthpost('/srapi/get/dologin', { code: code }).then((res) => {
						console.log('登录', res)
						wx.setStorageSync('openid', res.openid)
					})
				}
			})
		},
		onShow: function () {
			console.log('App Show')
		},
		onHide: function () {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	page {
		background-color: #f4f5f9;
	}
	button {
		margin: 0;
		padding: 0;
		outline: none;
		border-radius: 0;
		background-color: transparent;
		line-height: inherit;
		border: none;
	}
	button::after {
		border: none;
	}

	/* 清除点击态效果 */
	.button-hover {
		background-color: transparent !important;
		opacity: 1 !important;
	}

	.no_list {
		padding: 100rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		border-radius: 20rpx;
		.no_list_img {
			width: 334rpx;
			height: 217rpx;
		}
		.no_list_text {
			font-size: 20rpx;
			font-weight: 700;
			color: #afb1b5;
			letter-spacing: 1.2rpx;
			margin-top: -50rpx;
		}
	}

	.picker_popup_box {
		.picker_popup_box_top {
			position: relative;
			padding: 30rpx;
		}
		.picker_popup_box_top_zw {
			width: 44rpx;
			height: 44rpx;
			position: absolute;
			right: 0;
			top: 0;
			padding: 30rpx;
		}
		.picker_popup_box_top_title {
			padding-top: 20rpx;
			font-size: 32rpx;
			font-weight: 700;
			text-align: center;
			color: #000000;
			margin-bottom: 40rpx;
		}
		.picker_popup_box_nr {
			width: 750rpx;
			padding-bottom: 100rpx;
			padding-bottom: calc(100rpx + constant(safe-area-inset-bottom));
			padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
		}
	}
</style>
